home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / MATHS / PARI / PARI1 / pari / testin < prev    next >
Text File  |  1991-12-09  |  9KB  |  414 lines

  1. \e
  2. \precision=40
  3. pi
  4. \precision=20
  5. o(x^12)
  6. 5/3+o(127^5)
  7. \\ A
  8. abs(-0.01)
  9. acos(0.5)
  10. acosh(3)
  11. acurve=initell([0, 0, 1, -1, 0])
  12. apoint=[2, 2]
  13. isoncurve(acurve, apoint)
  14. addell(acurve, apoint, apoint)
  15. adj([1, 2; 3, 4])
  16. agm(1, 2)
  17. agm(1 + o(7^5), 8 + o(7^5))
  18. algdep(2 * cos(2 * pi / 13), 6)
  19. anell(acurve, 100)
  20. apell(acurve,10007)
  21. apell2(acurve,10007)
  22. apol=x^3+5*x+1
  23. apprpadic(apol,1+O(7^8))
  24. apprpadic(x^3+5*x+1,mod(x*(1+O(7^8)),x^2+x-1))
  25. 4 * arg(3+3*i)
  26. 3 * asin(sqrt(3)/2)
  27. asinh(0.5)
  28. assmat(x^5-12*x^3+0.0005)
  29. 3 * atan(sqrt(3))
  30. atanh(0.5)
  31. \\ B
  32. base(x^3+4*x+5)
  33. bernreal(12)
  34. bernvec(6)
  35. bezout(123456789,987654321)
  36. bigomega(12345678987654321)
  37. bin(1.1,5)
  38. binary(65537)
  39. bittest(10^100,100)
  40. boundcf(pi,5)
  41. boundfact(40!+1,100000)
  42. \\ C
  43. ceil(-2.5)
  44. centerlift(mod(456,555))
  45. cf(pi)
  46. cf2([1,3,5,7,9],(exp(1)-1)/(exp(1)+1))
  47. changevar(x + y, [z, t])
  48. char([1, 2; 3, 4], z)
  49. char(mod(x^2+x+1,x^3+5*x+1),z)
  50. char1([1, 2; 3, 4], z)
  51. char2(mod(1,8191)*[1, 2; 3, 4], z)
  52. acurve = chell(acurve, [-1, 1, 2, 3])
  53. chinese(mod(7, 15), mod(13, 21))
  54. apoint = chptell(apoint, [-1, 1, 2, 3])
  55. isoncurve(acurve, apoint)
  56. classno(-12391)
  57. classno(1345)
  58. classno2(-12391)
  59. classno2(1345)
  60. coeff(sin(x),7)
  61. compo(1+o(7^4), 3)
  62. compose(qfi(2, 1, 3), qfi(2, 1, 3))
  63. comprealraw(qfr(5,3,-1,0.),qfr(7,1,-1,0.))
  64. concat([1, 2], [3, 4])
  65. conj(1+i)
  66. %_
  67. content([123, 456, 789, 234])
  68. convol(sin(x), x * cos(x))
  69. cos(1)
  70. cosh(1)
  71. cvtoi(1.7)
  72. cyclo(105)
  73. \\ D
  74. denom(12345/54321)
  75. deriv((x + y)^5, y)
  76. ((x+y)^5)'
  77. det([1, 2, 3; 1, 5, 6; 9, 8, 7])
  78. det2([1, 2, 3; 1, 5, 6; 9, 8, 7])
  79. detr([1, 2, 3; 1, 5, 6; 9, 8, 7])
  80. dilog(0.5)
  81. disc(x^3+4*x+5)
  82. discf(x^3+4*x+5)
  83. divisors(8!)
  84. divres(345, 123)
  85. divres(x^7 - 1, x^5 + 1)
  86. divsum(8!,x,x)
  87. \\ E
  88. eigen([1, 2, 3; 4, 5, 6; 7, 8, 9])
  89. eint1(2)
  90. erfc(2)
  91. eta(q)
  92. euler
  93. z = y; y = x; eval(z)
  94. exp(1)
  95. extract([1,2,3,4,5,6,7,8,9,10], 1000)
  96. \\ F
  97. 10!
  98. fact(10)
  99. lift(lift(factfq(x^3+x^2+x-1,3,t^3+t^2+t-1)))
  100. factmod(x^11+1, 7)
  101. factor(17!+1)
  102. p=x^5+3021*x^4-786303*x^3-6826636057*x^2-546603588746*x+3853890514072057
  103. fa=[11699, 6; 2392997, 2; 4987333019653, 2]
  104. factoredbase(p,fa)
  105. factoreddiscf(p,fa)
  106. \precision=40
  107. factoredpolred(p,fa)
  108. factoredpolred2(p,fa)
  109. \precision=20
  110. lift(factornf(y^3+y^2-2*y-1,x^3+x^2-2*x-1))
  111. factorpadic(apol,7,8)
  112. factpol(x^15-1, 3)
  113. factpol(x^15-1, 0)
  114. factpol2(x^15-1, 0)
  115. fibo(100)
  116. floor(-1/2)
  117. floor(-2.5)
  118. for(x=1,5,print(x!))
  119. fordiv(10,x,print(x))
  120. forprime(p=1,30,print(p))
  121. forstep(x=0,pi,pi/12,print(sin(x)))
  122. frac(-2.7)
  123. \\ G
  124. galois(x^6-3*x^2-1)
  125. galoisconj(x^6+108)
  126. gamh(10)
  127. gamma(10.5)
  128. gauss(hilbert(10),[1, 2, 3, 4, 5, 6, 7, 8, 9, 0])
  129. gcd(12345678, 87654321)
  130. globalred(acurve)
  131. k=4;goto(k%2);label(0);print("even");goto(3);label(1);print("odd");label(3);
  132. \\ H
  133. hclassno(2000003)
  134. hell(acurve, apoint)
  135. hell2(acurve, apoint)
  136. hell3(acurve, apoint)
  137. hermite(1/hilbert(7))
  138. hess(hilbert(7))
  139. hilb(2/3, 3/4, 5)
  140. hilbert(5)
  141. hilbp(mod(5,7),mod(6, 7))
  142. hvector(10,x,1/x)
  143. hyperu(1,1,1)
  144. \\ I
  145. i^2
  146. idmat(5)
  147. if(3 < 2, print("bof"), print("ok"));
  148. imag(2+3*i)
  149. image([1,3,5;2,4,6;3,5,7])
  150. incgam(2,1)
  151. incgam1(2,1)
  152. incgam2(2,1)
  153. incgam3(2,1)
  154. incgam4(4,1,6)
  155. indexrank([1,1,1;1,1,1;1,1,2])
  156. indsort([8, 7, 6, 5])
  157. initalg(x^5-5*x^4+8*x^3-4*x^2-1)
  158. initell([0,0,0,-1,0])
  159. initell2([0,0,0,0,-1])
  160. integ(sin(x), x)
  161. intersect([1,2;3,4;5,6],[2,3;7,8;8,9])
  162. \precision=9
  163. intgen(x=0,pi,sin(x))
  164. sqr(2*intgen(x=0,4,exp(-x^2)))
  165. 4*intinf(x=1,10000,1/(1+x^2))
  166. intnum(x = -0.999, 0.999, 1/sqrt(1 - x^2))
  167. 2 * intopen(x = 0, 100, sin(x)/x)
  168. \precision=28
  169. inverseimage([1,1;2,3;5,7],[2,2,6]~)
  170. isfund(12345)
  171. isincl(x^2+1,x^4+1)
  172. isisom(x^3+x^2-2*x-1,x^3+x^2-2*x-1)
  173. isprime(12345678901234567)
  174. ispsp(73!+1)
  175. isqrt(10!^2+1)
  176. issqfree(123456789876543219)
  177. issquare(12345678987654321)
  178. \\ J
  179. jacobi(hilbert(6))
  180. jbesselh(1,1)
  181. jell(i)
  182. \\ K
  183. kbessel(1 + i, 1)
  184. kbessel2(1 + i, 1)
  185. x
  186. y
  187. ker(matrix(4,4,x,y,x/y))
  188. keri(matrix(4,4,x,y,x+y))
  189. kerint(matrix(4,4,x,y,x*y))
  190. kerint1(matrix(4,4,x,y,x*y))
  191. kerint2(matrix(4,6,x,y,2520/(x+y)))
  192. kerr(matrix(4,4,x,y,sin(x+y)))
  193. f(u)=u+1;
  194. print(f(5)); kill(f);
  195. f=12
  196. kro(5,7)
  197. kro(3,18)
  198. \\ L
  199. k=4;goto(k%2);label(0);print("even");goto(3);label(1);print("odd");label(3);
  200. laplace(x*exp(x*y)/(exp(x)-1))
  201. lcm(15,-21)
  202. length(divisors(1000))
  203. legendre(10)
  204. lex([1,3],[1,3,5])
  205. lexsort([[1,5],[2,4],[1,5,1],[1,4,2]])
  206. lift(chinese(mod(7,15),mod(4,21)))
  207. lindep([(1-3*sqrt(2))/(3-2*sqrt(3)),1,sqrt(2),sqrt(3),sqrt(6)])
  208. lindep2([(1-3*sqrt(2))/(3-2*sqrt(3)),1,sqrt(2),sqrt(3),sqrt(6)],40)
  209. m=1/hilbert(7)
  210. mp=concat(m,idmat(7))
  211. lll(m)
  212. lll1(m)
  213. lllgram(m)
  214. lllgram1(m)
  215. lllgramint(m)
  216. lllgramkerim(mp~*mp)
  217. lllint(m)
  218. lllkerim(mp)
  219. lllrat(m)
  220. \precision=100
  221. ln(2)
  222. lngamma(10^50*i)
  223. \precision=2000
  224. log(2)
  225. logagm(2)
  226. \precision=9
  227. bcurve=initell([0,0,0,-3,0])
  228. localred(bcurve,2)
  229. ccurve=initell([0,0,-1,-1,0])
  230. l=lseriesell(ccurve,2,-37,1)
  231. lseriesell(ccurve,2,-37,1.2)-l
  232. \\ M
  233. mat(concat(vector(4,x,x)~,vector(4,x,10+x)~))
  234. matell(initell([0,0,0,-17,0]),[[-1,4],[-4,2]])
  235. matextract(matrix(15,15,x,y,x+y),vector(5,x,3*x),vector(3,y,3*y))
  236. matinvr(1.*hilbert(7))
  237. matsize([1,2;3,4;5,6])
  238. matrix(5,5,x,y,gcd(x,y))
  239. matrixqz([1,3;3,5;5,7],0)
  240. matrixqz2([1/3,1/4,1/6;1/2,1/4,-1/4;1/3,1,0])
  241. matrixqz3([1,3;3,5;5,7])
  242. max(2,3)
  243. min(2,3)
  244. minim([2,1;1,2])
  245. mod(-12,7)
  246. modp(-12,7)
  247. mod(10873,49649)^-1
  248. modreverse(mod(x^2+1,x^3-x-1))
  249. mu(3*5*7*11*13)
  250. \\ N
  251. newtonpoly(x^4+3*x^3+27*x^2+9*x+81,3)
  252. nextprime(100000000000000000000000)
  253. norm(1+i)
  254. norm(mod(x+5,x^3+x+1))
  255. norml2(vector(10,x,x))
  256. nucomp(qfi(2,1,9),qfi(4,3,5),3)
  257. form=qfi(2,1,9);nucomp(form,form,3)
  258. numdiv(2^99*3^49)
  259. numer((x+1)/(x-1))
  260. nupow(form,111)
  261. \\ O
  262. 1/(1+x)+o(x^20)
  263. omega(100!)
  264. ordell(acurve, 1)
  265. order(mod(33,2^16+1))
  266. ordred(x^3-12*x+45*x-1)
  267. \\ P
  268. pascal(8)
  269. permutation(7,1035)
  270. pf(-44,3)
  271. phi(257^2)
  272. pi
  273. plot(x=-5,5,sin(x))
  274. \\ ploth(x=-5,5,sin(x))
  275. \\ ploth2(t=0,2*pi,[sin(5*t),sin(7*t)])
  276. pnqn([2,6,10,14,18,22,26])
  277. pnqn([1,1,1,1,1,1,1,1;1,1,1,1,1,1,1,1])
  278. pointell(acurve,zell(acurve,apoint))
  279. polint([0,2,3],[0,4,9],5)
  280. polred(x^5-2*x^4-4*x^3-96*x^2-352*x-568)
  281. polred2(x^4-28*x^3-458*x^2+9156*x-25321)
  282. polsym(x^17-1,17)
  283. poly(sin(x),x)
  284. polylog(5,0.5)
  285. polylog(-4,t)
  286. polylogd(5,0.5)
  287. polylogdold(5,0.5)
  288. polylogp(5,0.5)
  289. poly([1,2,3,4,5],x)
  290. polyrev([1,2,3,4,5],x)
  291. powell(acurve,10,apoint)
  292. powrealraw(qfr(5,3,-1,0.),3)
  293. pprint((x-12*y)/(y+13*x));
  294. pprint([1,2;3,4])
  295. pprint1(x+y);pprint(x+y);
  296. \precision=100
  297. pi
  298. prec(pi,20)
  299. \precision=20
  300. prime(100)
  301. primes(100)
  302. forprime(p=2,100,print(p, " ", lift(primroot(p))))
  303. print((x-12*y)/(y+13*x));
  304. print([1,2;3,4])
  305. print1(x+y);print1(" egale ");print(x+y);
  306. prod(1,k=1,10,1+1/k!)
  307. prod(1.,k=1,10,1+1/k!)
  308. pi^2/6*prodeuler(p=2,10000,1-p^-2)
  309. prodinf(n=0,(1+2^-n)/(1+2^(-n+1)))
  310. prodinf1(n=0,-2^-n/(1+2^(-n+1)))
  311. psi(1)
  312. \\ Q
  313. quadgen(-11)
  314. quadpoly(-11)
  315. \\ R
  316. smith(matrix(5,5,j,k,random()))
  317. rank(matrix(5,5,x,y,x+y))
  318. print1("give a value for s? ");s=read();print(1/s)
  319. 37.
  320. real(5-7*i)
  321. recip(3*x^7-5*x^3+6*x-9)
  322. redcomp(qfi(3,10,12))
  323. redreal(qfr(3,10,-20,1.5))
  324. redrealnod(qfr(3,10,-20,1.5),18)
  325. regula(17)
  326. kill(y);print(x+y);reorder([x, y]); print(x+y);
  327. resultant(x^3-1,x^3+1)
  328. resultant2(x^3-1.,x^3+1.)
  329. reverse(tan(x))
  330. rhoreal(qfr(3,10,-20,1.5))
  331. rhorealnod(qfr(3,10,-20,1.5),18)
  332. rndtoi(prod(1,k=1,17,x-exp(2*i*pi*k/17)))
  333. rootmod(x^16-1,41)
  334. rootpadic(x^4+1,41,6)
  335. roots(x^5-1)
  336. rootslong(x^4-1000000000000000000000)
  337. round(prod(1,k=1,17,x-exp(2*i*pi*k/17)))
  338. rounderror(prod(1,k=1,17,x-exp(2*i*pi*k/17)))
  339. \\ S
  340. q*series(anell(acurve,100),q)
  341. shift(1,50)
  342. shift([3,4,-11,-12],-2)
  343. shiftmul([3,4,-11,-12],-2)
  344. sigma(100)
  345. sigmak(2,100)
  346. sigmak(-3,100)
  347. sign(-1)
  348. sign(0)
  349. sign(0.)
  350. signat(hilbert(5)-0.11*idmat(5))
  351. simplify(((x+i+1)^2-x^2-2*x*(i+1))^2)
  352. sin(pi/6)
  353. sinh(1)
  354. size([1.3*10^5,2*i*pi*exp(4*pi)])
  355. smallbase(x^3+4*x+5)
  356. smalldiscf(x^3+4*x+5)
  357. smallfact(100!+1)
  358. smallinitell([0,0,0,-17,0])
  359. smallpolred(x^4+576)
  360. smallpolred2(x^4+576)
  361. smith(1/hilbert(6))
  362. solve(x=1,4,sin(x))
  363. sort(vector(17,x,5*x%17))
  364. sqr(1+o(2))
  365. sqred(hilbert(5))
  366. sqrt(13+o(127^12))
  367. srgcd(x^10-1,x^15-1)
  368. apol=0.3+legendre(10)
  369. sturm(apol)
  370. sturmpart(apol,0.91,1)
  371. subell(initell([0,0,0,-17,0]),[-1,4],[-4,2])
  372. subst(sin(x),x,y)
  373. subst(sin(x),x,x+x^2)
  374. sum(0,k=1,10,2^-k)
  375. sum(0.,k=1,10,2^-k)
  376. \precision=20
  377. 4*sumalt(n=0,(-1)^n/(2*n+1))
  378. suminf(n=1,2^-n)
  379. 6/pi^2*sumpos(n=1,n^-2)
  380. supplement([1,3;2,4;3,6])
  381. \\ T
  382. sqr(tan(pi/3))
  383. tanh(1)
  384. taylor(y/(x-y),y)
  385. tchebi(10)
  386. tchirnhausen(x^5-x-1)
  387. teich(7+o(127^12))
  388. texprint((x+y)^3/(x-y)^2)
  389. theta(0.5,3)
  390. thetanullk(0.5,7)
  391. trace(1+i)
  392. trace(mod(x+5,x^3+x+1))
  393. trans(vector(2,x,x))
  394. %*%~
  395. trunc(-2.7)
  396. trunc(sin(x^2))
  397. type(mod(x,x^2+1))
  398. \\ U
  399. unit(17)
  400. n=33;until(n==1,print1(n," ");if(n%2,n=3*n+1,n=n/2));print(1)
  401. \\ V
  402. valuation(6^10000-1,5)
  403. vec(sin(x))
  404. vecsort([[1,8],[2,5],[3,6],[4,1]],2)
  405. \\ W
  406. wf(i)
  407. wf2(i)
  408. m=5; while(m<20, print1(m, " ");m=m+1); print()
  409. \\ Z
  410. zell(acurve, apoint)
  411. zeta(3)
  412. zeta(0.5+14.1347251*i)
  413.  
  414.